home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 May / EnigmA AMIGA RUN 18 (1997)(G.R. Edizioni)(IT)[!][issue 1997-05][EAR-CD II].iso / earcd / util / dir / managers.lha / Managers / Dir / Dir.find < prev    next >
Text File  |  1997-01-15  |  1KB  |  72 lines

  1. G4C
  2.  
  3. ; A GUI for finding files with the list command
  4. ; To be used from the dir.gc GUI *only*
  5.  
  6.  
  7. WinBig -1 -1 400 150 ''
  8. WinType 11110001
  9. Box 0 0 0 0 out button
  10.  
  11. ;========================== Genaral events
  12.  
  13. xOnLoad
  14. setscreen dir.find $lv_fmscreen      ; it may be on another screen.
  15.  
  16. xOnOpen
  17. setvar fd_dir  $$LV_DIR
  18. setvar fd_id   $$LV_ID
  19. setwintitle Dir.find 'Dir $fd_dir                                   '
  20. setgad dir.find 2 ON
  21.  
  22. xOnClose
  23. guiquit dir.find
  24.  
  25. xOnQuit
  26. delvar fd_dir
  27. delvar fd_id
  28. delvar fd_string
  29. delvar fd_file
  30. delvar fd_fullpath
  31.  
  32. xOnFail
  33. update dir.find 1 '*** Error during find ***'
  34. guiwindow dir.find resume
  35.  
  36. ;========================= Gadgets
  37.  
  38. Text    10 2 390 14 "Enter filename substring :" 120 NOBOX
  39. gadid 1
  40.  
  41.  
  42. xTextIn  5 15 390 20 "" fd_string "" 130
  43. gadid 2
  44. guiwindow dir.find wait
  45. cd $fd_dir
  46. setstack 6000
  47. Launch 1 'list >env:.result SUB $fd_string ALL LFORMAT=%S%S'
  48. setstack 4000
  49.  
  50.  
  51. xOnReturn 1
  52. lvchange dir.find 3 env:.result
  53. guiwindow dir.find resume
  54. update dir.find 1 'Ready - Click on file required.'
  55.  
  56.  
  57. xlistview 5 40 390 108 "" fd_file "" 10 TXT
  58. GADID 3
  59. extract fd_file path fd_path
  60. extract fd_file file fd_name
  61. joinfile $fd_dir $fd_path fd_fullpath
  62. lvdir dir.gc $fd_id #$fd_fullpath
  63. lvfind dir.gc $fd_id $fd_name
  64. if $fd_id = 1
  65.    setwintitle dir.gc '$fd_fullpath                               '
  66. else
  67.    update dir.gc 10 '$fd_fullpath'
  68. endif
  69.  
  70.  
  71.  
  72.